package cn.edu.guet.service.shopping.impl;

import cn.edu.guet.bean.shopping.Shopping;
import cn.edu.guet.mapper.shopping.ShoppingMapper;
import cn.edu.guet.service.shopping.IShoppingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShoppingServiceImpl implements IShoppingService {

    @Autowired
    private ShoppingMapper shoppingMapper;


    @Override
    public List<Shopping> findbyuserid(Integer userid) {
        return shoppingMapper.findbyuserid(userid);
    }

    @Override
    public List<Shopping> shopping(String bname) {
        return shoppingMapper.shopping(bname);
    }


    @Override
    public void update(Shopping shopping) {
        shoppingMapper.update(shopping);
    }

    @Override
    public String selectIsBuy(String userid,String bid) {
        return shoppingMapper.selectIsBuy(userid,bid);
    }

    @Override
    public void insert(Shopping shopping) {
        shoppingMapper.insert(shopping);
    }

//    @Override
//    public List<TG> findbyid(Integer loginuserid) {
//        return shoppingMapper.findbyid(loginuserid);
//    }
//
//    @Override
//    public List<TG> getbprice() {
//        return shoppingMapper.getbprice();
//    }


}
